<template>
    <div class="personal-center">
        <personal-information :src="userInfo.pic" :name="userInfo.realname" :address="userInfo.address" />
        <div class="bottom-ash-line">
            <operation src="stock-out.png" path="/accounting/stock-out-list" title="新增出库" />
            <operation src="stock-entry.png" path="/accounting/stock-entry-list" title="新增入库" />
            <operation src="record-mark.png" path="/accounting/record" title="出入库提交记录" />
            <operation src="record-mark.png" path="/accounting/stock-out-verify" title="出库审核" />
        </div>
        <operation src="clock.png" path="/public/message-list" title="消息通知" />
        <operation src="setting.png" path="/public/securitySettings" title="安全设置" />
        <tab-group :dataset="navButtonTab" identity="6" index="3"></tab-group>
    </div>
</template>

<script>
    import TabGroup from "../../components/currency/tab/tab.vue";
    import PersonalInformation from '../../components/currency/personal/information.vue';

    import TitleNormal from '../../components/currency/title/normal.vue';

    import Operation from '../../components/currency/personal/operation.vue';
    
    export default {
        name: "accountingUser",
        components:{
            TabGroup,PersonalInformation,TitleNormal,
            Operation
        },
        data(){
            return{
                count:'',
                navButtonGroup: [
                    {
                        name: "待上交", route: {
                            path: '/salesman/order-listing', data: {
                                index: 0
                            }
                        }
                    },
                    {
                        name: "待确认", route: {
                            path: '/salesman/order-listing', data: {
                                index: 1
                            }
                        }
                    },
                    {
                        name: "已上交", route: {
                            path: '/salesman/order-listing', data: {
                                index: 2
                            }
                        }
                    },
                    {
                        name: "已取消", route: {
                            path: '/salesman/order-listing', data: {
                                index: 3
                            }
                        }
                    }
                ],
                navButtonTab: [
                    {
                        name: "订单", route: { path:'/accounting/index'}
                    },
                    {
                        name: "报价管理", route: { path:'/accounting/quoted-price-manage'}
                    },
                    {
                        name: "个人中心", route: { path:'/accounting/personal-center'}
                    },
                    {
                        name: "个人中心", route: { path:'/accounting/personal-center'}
                    }
                ],
            }
        },
        computed:{
            userInfo(){
                return this.$store.state.options.user.oda
            }
        },
        mounted(){
          this.getServerCount();
        },
        methods:{
            getServerCount(){
                var that = this;
                var url = '/api/home/user/getlist';
                var param = {
                    page: 0,
                    list_rows: 10,
                    status:1,
                    token:this.$store.state.options.user.token
                };
                this.$util.postRequestInterface(url,param,(res)=>{
                    that.count = res.data.count
                })
            }
        }
    }
</script>

<style lang="scss" scoped>
    .personal-center {
        .nav-menu-button {
            border-top-left-radius: 1rem;
            border-top-right-radius: 1rem;

            .header {
                padding: 1rem 0rem;
                margin: 0rem 1rem;
                border-bottom: 0.1rem solid #EEEEEE;
            }

            .body {
                margin: 2rem 0rem 1.6rem;
            }
        }
    }
</style>
